
<include file="Public/ace_header" />
<div class="row">
    <div class="col-xs-12">
        <div class="row hidden-480 search">
            <form id="search-form">
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[id]" id="id" value="{$_GET[searchMap][id]}" placeholder="ID"/>
                </div>
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[funding_id]" id="funding_id" value="{$_GET[searchMap][funding_id]}" placeholder="众筹项目"/>
                </div>
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[user_id]" id="user_id" value="{$_GET[searchMap][user_id]}" placeholder="用户名称"/>
                </div>
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[created_atStart]" id="created_atStart" value="{$_GET[searchMap][created_atStart]}" placeholder="评论时间开始时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="" onChange="created_atStartChange()"/>
                </div>
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[created_atEnd]" id="created_atEnd" value="{$_GET[searchMap][created_atEnd]}" placeholder="评论时间结束时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="" onChange="created_atEndChange()"/>
                </div>
                <script>
                    function created_atStartChange() {
                        var created_atEnd = $("#created_atEnd").val();
                        if (created_atEnd != "") {
                            var created_atStart = $("#created_atStart").val();
                            if (created_atEnd < created_atStart) {
                                alert("起始时间必须早于结束时间!");
                                $("#created_atStart").val("");
                            }
                        }
                    }
                    function created_atEndChange() {
                        var created_atStart = $("#created_atStart").val();
                        if (created_atStart != "") {
                            var created_atEnd = $("#created_atEnd").val();
                             if (created_atStart > created_atEnd) {
                                alert("结束时间必须晚于起始时间!");
                                $("#created_atEnd").val("");
                            }
                        }
                    }
                    </script>
                <div class="col-md-3 col-md-offset-6 center search-input-div">
                    <button type="submit" class="btn btn-success btn-xs">查询</button>
                    <button class="btn btn-warning btn-xs" type="button" href="#" onclick="clearFind()">清空</button>
                    <button class="btn btn-danger btn-xs" type="button" href="javascript:void(0);" id="delall">删除</button>
                </div>
            </form>
        </div>
        <div class="table-responsive">
            <table class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th class="center">
                            <label>
                                <input type="checkbox" class="ace" id="checkall"/>
                                <span class="lbl"></span>
                            </label>
                        </th>
                    <th class="center">ID</th>
                    <th class="center">众筹项目</th>
                    <th class="center">用户名称</th>
                    <th class="center">内容</th>
                    <th class="center">评论时间</th>
                    <th class="center"></th>
                        <th class="center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="list" id="vo">
                    <tr>
                        <td class="center">
                            <label>
                                <input type="checkbox" class="ace" name="chkid" value="{$vo['id']}"/>
                                <span class="lbl"></span>
                            </label>
                        </td>
                        <td class="center">{$vo[id]}</td>
                        <td class="center"><php> echo D("Funding")->find($vo["funding_id"])["name"];</php></td>
                        <td class="center"><php> echo D("User")->find($vo["user_id"])["username"];</php></td>
                        <td class="center">{$vo[content]}</td>
                        <td class="center"><if condition="$vo[created_at] neq 0">{$vo[created_at]|default=''|date="Y-m-d H:i:s",###}</if></td>
                        <td class="center">{$vo[reply]}</td>
                            <td class="center">
                                <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                    <a class="delete-btn" id="{$vo['id']}" >
                                        <button class="btn btn-xs btn-danger" style="border: 1px;">
                                            <i class="icon-trash"></i>
                                        </button>
                                    </a>
                                </div>
                                <div class="visible-xs visible-sm hidden-md hidden-lg">
                                    <div class="inline position-relative">
                                        <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
                                            <i class="icon-cog icon-only bigger-110"></i>
                                        </button>
                                        <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
                                            <li>
                                                <a class="delete-btn" id="{$vo['id']}">
                                                    <span class="red">
                                                        <i class="icon-trash bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
            {$page}
        </div><!-- /.table-responsive -->
    </div><!-- /span -->
</div><!-- /row -->
<include file="Public/ace_footer" />